import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_goods_specification",{schema:"nest-mall" } )
@Index("goods_id",["goodsId",])
@Index("specification_id",["specificationId",])
export class MallGoodsSpecification {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"goods_id"
        })
    goodsId:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"specification_id"
        })
    specificationId:number;
        

    @Column("varchar",{ 
        nullable:true,
        length:50,
        name:"value"
        })
    value:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"pic_url"
        })
    picUrl:string | null;
        
}
